<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>首页--layui后台管理模板 2.0</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="${pageContext.servletContext.contextPath}/resources/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="${pageContext.servletContext.contextPath}/resources/css/public.css" media="all" />
</head>
<body class="childrenBody">

	<div class="layui-row layui-col-space10">
		<div class="layui-col-lg6 layui-col-md6"  style="width:800px; margin-left: 260px;">
			<h2 style="padding-top: 50px; padding-left: -20px">任务平台</h2>
			<%--<div class="layui-input-block">--%>
				<%--<div class="layui-inline">--%>
                    <%--<form method="get" action="/chaxun/1">--%>
                        <%--<label style="font-size: 20px;">关键字</label>--%>
                        <%--<div class="layui-input-inline">--%>
                            <%--<input type="text" name="key" placeholder="请输入任务类型" autocomplete="off" class="layui-input">--%>
                        <%--</div>--%>
                        <%--<input type="submit" value="搜索" class="layui-btn layui-btn-normal">--%>
                    <%--</form>--%>
				<%--</div>--%>
			<%--</div>--%>

			<div class="layui-tab-item layui-show">
				<fieldset class="layui-elem-field">
					<legend>已发布任务</legend>
					<div class="layui-field-box">
						<c:forEach items="${tasks}" var="task">
							<%--<button type="button" style="background-color: #63c3ea;" class="layui-btn layui-btn-primary layui-btn-xs"><c:if test="${task.state==0}"><a href="#">待解决</a></c:if><c:if test="${task.state==1}">解决中</c:if></button>--%>
							<span style="background-color: #63c3ea;"><c:if test="${task.state==0}"><a href="/acceptTask/${task.taskId}">待解决</a></c:if><c:if test="${task.state==1}">解决中</c:if></span>
							<fieldset class="layui-elem-field">
								<legend style="font-size: 30px;">${task.taskname}</legend>
								<div class="layui-field-box" style="padding-left: 10px;">
									<label style="font-size: 15px; color: #908e8e;" >详细描述</label>
									<label style="font-size: 15px; color: #908e8e;"  >发布时间:</label>
									<label style="font-size: 15px; color: #908e8e;"  >${task.addtime}</label>
									<label style="font-size: 15px; color: #908e8e;"  >积分:</label>
									<label style="font-size: 15px; color: #908e8e;"  >${task.reward}</label>
                                    <label style="font-size: 15px; color: #908e8e;"  >发布人姓名:</label>
                                    <label style="font-size: 15px; color: #908e8e;"  >${task.student.stuName}</label>
                                    <label style="font-size: 15px; color: #908e8e;"  >发布人电话:</label>
                                    <label style="font-size: 15px; color: #908e8e;"  >${task.student.tel}</label>
                                    <label style="font-size: 15px; color: #908e8e;"  >发布人楼栋号:</label>
                                    <label style="font-size: 15px; color: #908e8e;"  >${task.student.buildNumber}</label>
								</div>
								<br/>
								<br/>
								<br/>
								<div class="layui-field-box">
									<p style="padding-left: 30px;">${task.taskcontext}</p>
								</div>
							</fieldset>
						</c:forEach>
						<br/>
						<br/>
					</div>
                    ${page}
				</fieldset>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="${pageContext.servletContext.contextPath}/resources/layui/layui.js"></script>
	<script type="text/javascript" src="${pageContext.servletContext.contextPath}/resources/js/main.js"></script>

	<script>
        layui.use(['form','laypage', 'layer','jquery'], function(){
            var form = layui.form
            var laypage = layui.laypage
            ,layer = layui.layer;
            $ = layui.jquery;
        });
	</script>

</body>
</html>